import { Config, Inject, Provide } from '@midwayjs/decorator';
import { BaseService } from '@cool-midway/core';
import { BizWorkerIntroduceEntity } from '../entity/introduce';
import { InjectEntityModel } from '@midwayjs/typeorm';
import { Repository } from 'typeorm';

/**
 * 介绍表服务
 */
@Provide()
export class BizWorkerIntroduceService extends BaseService {
  @InjectEntityModel(BizWorkerIntroduceEntity)
  bizWorkerIntroduceEntity: Repository<BizWorkerIntroduceEntity>;

  async getIntroduce(workerId: number) {
    const data = await this.bizWorkerIntroduceEntity.findOneBy({ workerId });

    return data;
  }
}
